#include<bits/stdc++.h>
using namespace std;
int main()
{
	int l, r, n;
	cin>>l>>r>>n;
	string s;
	cin>>s;
	
	int cnt = 0;
	for(int i = s.size()-1;i >= 0 && cnt < 5;)
	{
		if(s[i] < 'a'+r-1)
		{
			s[i]++;
			cout<<s<<endl;
			cnt++;
		}
		else
		{
			s[i] = l+'a'-1;
			i--;
		}
	}
	return 0;
}

